<?php

class MessagesController extends AppController
{
    public function index()
    {
        
    }
    
    public function search()
    {
        return $this->Message->find('all', array('conditions' => array('Message.user_id' => $this->Auth->user('id'))));
    }
    
    public function deleteall()
    {
        $this->Message->deleteAll(array('Message.user_id' => $this->Auth->user('id')));
    }
}
?>
